//bool, Obj this, Obj other

Settlement sett;
ObjList blds;
int i;

blds = sett.Buildings();

sett = .AsBuilding().settlement();
if(!sett.IsValid()) return false;

if (sett.IsIndependent())
	return false;
if (sett.UnitsCount() == 0) 
	return false;

if (other.AsUnit().IsAlive()) 
{
	Tower w;
	
	if (!.IsEnemy(other))
		return false;

	for (i = 0; i < blds.count(); i += 1) 
	{
		w = blds[i].AsTower();
		if (w.IsValid()) 
		{
			if (w.IsHeirOf("FakeTower")) 
			{
				if (w.CanAttack(other))
					return true;
			}
		}
	}
}
return false;
